import hasRole from '@/directive/permission/hasRole'
import hasPermi from '@/directive/permission/hasPermi'
import dialogDrag from '@/directive/dialog/drag'
import dialogDragWidth from '@/directive/dialog/dragWidth'
import dialogDragHeight from '@/directive/dialog/dragHeight'
import clipboard from '@/directive/module/clipboard'

const install = function (Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('clipboard', clipboard)
  Vue.directive('dialogDrag', dialogDrag)
  Vue.directive('dialogDragWidth', dialogDragWidth)
  Vue.directive('dialogDragHeight', dialogDragHeight)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  Vue.use(install); // eslint-disable-line
}

export default install
